package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ChatRoleMapper;
import com.ruoyi.system.domain.ChatRole;
import com.ruoyi.system.service.IChatRoleService;

/**
 * gptRoleService业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-28
 */
@Service
public class ChatRoleServiceImpl implements IChatRoleService 
{
    @Autowired
    private ChatRoleMapper chatRoleMapper;

    /**
     * 查询gptRole
     * 
     * @param id gptRole主键
     * @return gptRole
     */
    @Override
    public ChatRole selectChatRoleById(Long id)
    {
        return chatRoleMapper.selectChatRoleById(id);
    }

    /**
     * 查询gptRole列表
     * 
     * @param chatRole gptRole
     * @return gptRole
     */
    @Override
    public List<ChatRole> selectChatRoleList(ChatRole chatRole)
    {
        return chatRoleMapper.selectChatRoleList(chatRole);
    }

    /**
     * 新增gptRole
     * 
     * @param chatRole gptRole
     * @return 结果
     */
    @Override
    public int insertChatRole(ChatRole chatRole)
    {
        return chatRoleMapper.insertChatRole(chatRole);
    }

    /**
     * 修改gptRole
     * 
     * @param chatRole gptRole
     * @return 结果
     */
    @Override
    public int updateChatRole(ChatRole chatRole)
    {
        return chatRoleMapper.updateChatRole(chatRole);
    }

    /**
     * 批量删除gptRole
     * 
     * @param ids 需要删除的gptRole主键
     * @return 结果
     */
    @Override
    public int deleteChatRoleByIds(Long[] ids)
    {
        return chatRoleMapper.deleteChatRoleByIds(ids);
    }

    /**
     * 删除gptRole信息
     * 
     * @param id gptRole主键
     * @return 结果
     */
    @Override
    public int deleteChatRoleById(Long id)
    {
        return chatRoleMapper.deleteChatRoleById(id);
    }
}
